<?php
// .-----------------------------------------------------------------------------------
// | WE TRY THE BEST WAY 杭州博也网络科技有限公司
// |-----------------------------------------------------------------------------------
// | Author: 贝贝 <hebiduhebi@163.com>
// | Copyright (c) 2013-2016, http://www.itboye.com. All Rights Reserved.
// |-----------------------------------------------------------------------------------

namespace app\shop\model;
// use think\Model;
use think\model\Adv;
class Product extends Adv{
	use \traits\model\Auto;
	/**
	 * 上架
	 */
	const STATUS_ONSHELF = 1;

	/**
	 * 下架
	 */
	const STATUS_OFFSHELF = 0;


	/**
	 * 综合排序
	 */
	const SORT_COMPREHENSIVE = 10;

	/**
	 * 销量排序
	 */
	const SORT_SALE = 11;

	/**
	 * 价格从低到高
	 */
	const SORT_PRICE_ASC = 12;

	/**
	 * 价格从高到低
	 */
	const SORT_PRICE_DESC = 13;
	/**
	 * 开始时间从早到晚
	 */
	const SORT_START_TIME_ASC = 14;

	/**
	 * 开始时间从晚到早
	 */
	const SORT_START_TIME_DESC = 15;

	/**
	 * 结束时间从早到晚
	 */
	const SORT_END_TIME_ASC = 16;

	/**
	 * 结束时间从晚到早
	 */
	const SORT_END_TIME_DESC = 17;
	/**
	 * 人气从高到低
	 */
	const SORT_VIEW_DESC = 18;
	/**
	 * 新品 
	 */
	const SORT_TIME_DESC =19;

	protected $auto = [
		['updatetime', 'time', self::MODEL_BOTH,'function'],
		['createtime', NOW_TIME, self::MODEL_INSERT],
		['status', 1, self::MODEL_INSERT],
	];


}

